dynamic class com.c3d.mediaRotator.display.TransitionCountdown extends MovieClip
{
    var _countdownStyle: String = "radialSpin";
    var _controller;
    var _plateTransitionDuration;
    var _plateWaitDuration;
    var fullRotator;

    function TransitionCountdown()
    {
        super();
        this.attachEventListeners();
    }

    function bind($controller)
    {
        this._controller = $controller;
    }

    function startCountdownVisual($waitTime)
    {
        if ((__reg0 = this._countdownStyle) !== "radialSpin") 
        {
            return;
        }
    }

    function leaveAndRestart()
    {
    }

    function onPlateTransitionStartupRequest($event)
    {
        if ($event.initParams) 
        {
            this._plateWaitDuration = $event.initParams.delay;
            this._plateTransitionDuration = $event.initParams.duration;
            this.startCountdown();
            return;
        }
        this.startCountdown();
    }

    function onPlateTransitionHaltRequest($event)
    {
        this.pauseCountdown();
    }

    function onPlateTransitionStartupInteractionRequest($event)
    {
        this.resumeCountdown();
    }

    function onPlateTransitionHaltInteractionRequest($event)
    {
        this.pauseCountdown();
    }

    function onPlateTransitionConfigUpdate($event)
    {
    }

    function onPlateTransitionBegin($event)
    {
        this.fullRotator.reset();
    }

    function onRequestedPlateTransitionBegin($event)
    {
        this.fullRotator.reset();
    }

    function onPlateTransitionComplete($event)
    {
    }

    function onRequestedPlateTransitionComplete($event)
    {
    }

    function startCountdown()
    {
        this.fullRotator.startup(Number(this._controller.__get__transitionParameters().delay));
    }

    function pauseCountdown()
    {
        this.fullRotator.pauseCountdown();
    }

    function resumeCountdown()
    {
        this.fullRotator.resumeCountdown();
    }

    function onFullRotatorAddedToStage()
    {
    }

    function attachEventListeners()
    {
        com.c3d.common.events.CentralDispatch.addEventListener(com.c3d.mediaRotator.events.PanelTransitionEvent.TRANSITION_CONTROLLER_STARTUP_REQUEST, mx.utils.Delegate.create(this, this.onPlateTransitionStartupRequest));
        com.c3d.common.events.CentralDispatch.addEventListener(com.c3d.mediaRotator.events.PanelTransitionEvent.TRANSITION_CONTROLLER_STARTUP_REQUEST_INTERACTION, mx.utils.Delegate.create(this, this.onPlateTransitionStartupInteractionRequest));
        com.c3d.common.events.CentralDispatch.addEventListener(com.c3d.mediaRotator.events.PanelTransitionEvent.TRANSITION_CONTROLLER_HALT_REQUEST, mx.utils.Delegate.create(this, this.onPlateTransitionHaltRequest));
        com.c3d.common.events.CentralDispatch.addEventListener(com.c3d.mediaRotator.events.PanelTransitionEvent.TRANSITION_CONTROLLER_HALT_REQUEST_INTERACTION, mx.utils.Delegate.create(this, this.onPlateTransitionHaltInteractionRequest));
        com.c3d.common.events.CentralDispatch.addEventListener(com.c3d.mediaRotator.events.PanelTransitionEvent.TRANSITION_CONTROLLER_CONFIG_UPDATE, mx.utils.Delegate.create(this, this.onPlateTransitionConfigUpdate));
        com.c3d.common.events.CentralDispatch.addEventListener(com.c3d.mediaRotator.events.PanelTransitionEvent.TRANSITION_CONTROLLER_TRANSITION_BEGIN, mx.utils.Delegate.create(this, this.onPlateTransitionBegin));
        com.c3d.common.events.CentralDispatch.addEventListener(com.c3d.mediaRotator.events.PanelTransitionEvent.TRANSITION_CONTROLLER_REQUESTED_TRANSITION_BEGIN, mx.utils.Delegate.create(this, this.onRequestedPlateTransitionBegin));
        com.c3d.common.events.CentralDispatch.addEventListener(com.c3d.mediaRotator.events.PanelTransitionEvent.TRANSITION_CONTROLLER_TRANSITION_COMPLETE, mx.utils.Delegate.create(this, this.onPlateTransitionComplete));
        com.c3d.common.events.CentralDispatch.addEventListener(com.c3d.mediaRotator.events.PanelTransitionEvent.TRANSITION_CONTROLLER_REQUESTED_TRANSITION_COMPLETE, mx.utils.Delegate.create(this, this.onRequestedPlateTransitionComplete));
    }

}
